package com.mcp.mcpserver.entity;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.Map;

/**
 * @className: DBRequestBody
 * @Description: TODO
 * @version: v1.0.0
 * @author: frank jin
 * @date: 2025-08-12 13:38
 */
@Data
public class DBRequestBody {

    private String sql;

    private Map<String, Object> params;

    private DatabaseInstance databaseInstance;

    @JsonCreator // 如果使用带参数的构造函数
    public DBRequestBody(@JsonProperty("sql") String sql,
                         @JsonProperty("params") Map<String, Object> params,
                         @JsonProperty("databaseInstance") DatabaseInstance databaseInstance) {
        this.sql = sql;
        this.params = params;
        this.databaseInstance = databaseInstance;
    }

}
